const axios = require('axios')
module.exports = function requestAPI(url,method = 'GET', data) {
    //console.log(url)
    return axios( {
        url:url,
        method: method,
        headers: {
            referer: 'http://m.music.migu.cn/v3',
            'user-agent':
                'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.30 Safari/537.36',

        },
        data:method === 'POST'?data:''

    }).then((r) => {
        return r.data;
    }).catch((r) => {
        //console.log(r)
    })

}
